package com.paradogs.login.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: yumi
 * @date: 2024/10/25  21:35
 * @Description: TODO
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addCorsMappings(CorsRegistry registry) {
        registry.addMapping("/**")
                .allowedOrigins("*") // 允许的域
                .allowedMethods("*") // 允许的方法
                .allowedHeaders("*"); // 允许的头部
    }
}
